package com.bawei.library_base.room.address;

import androidx.room.Entity;
import androidx.room.Ignore;
import androidx.room.PrimaryKey;

/**
 * @author : zhiyu
 * @date : 2021/12/22
 * @content :
 */
@Entity
public class Address {
    @PrimaryKey(autoGenerate = true)
    private Long id;

    //收货人
    private String name;
    //联系方式
    private String phone;
    //详细地址
    private String from;
    //是否选择地址
    private boolean istrue;


    @Override
    public String toString() {
        return "Address{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", phone='" + phone + '\'' +
                ", from='" + from + '\'' +
                ", istrue=" + istrue +
                '}';
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getFrom() {
        return from;
    }

    public void setFrom(String from) {
        this.from = from;
    }

    public boolean isIstrue() {
        return istrue;
    }

    public void setIstrue(boolean istrue) {
        this.istrue = istrue;
    }

    @Ignore
    public Address() {
    }

    public Address(Long id, String name, String phone, String from, boolean istrue) {
        this.id = id;
        this.name = name;
        this.phone = phone;
        this.from = from;
        this.istrue = istrue;
    }
}
